package com.ruoyi.web.core.config;

import com.eic.framework.core.security.SecurityMatchers;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

/**
 * spring security配置
 * 
 * @author ruoyi
 */
@Component
public class SecurityConfig
{

    @PostConstruct
    public void configure() throws Exception
    {
        // 注解标记允许匿名访问的url
        SecurityMatchers.setLogoutUrl("/logout");
        SecurityMatchers.addPermitExtens("html","js","ico");
        SecurityMatchers.addPermitPatterns("/login", "/register", "/captchaImage");
        SecurityMatchers.addPermitPatterns("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**");
    }
}
